var _paq = _paq || [];
var _hmt = _hmt || [];

_paq.push = function (v) {
    if (v && typeof v[0] !== 'undefined') {
        v[0] = '_' + v[0];
    }
    _hmt.push(v);
};

(function () {
    var ua = navigator.userAgent.toLowerCase();
    var clientEnv = {
        isApp: function () {
            return ua.match(/cdd/i) == "cdd";
        },
        isWx: function () {
            return ua.match(/MicroMessenger/i) == "micromessenger";
        }
    };
    if (clientEnv.isApp()) {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b83013583d84bb149fb4463c5d1f41ce";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    } else {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c4a91ad8fb2234be72208c50e5addef9";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    }
})();